<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: UWBIRStochasticPathlossModel Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00226.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-static-methods">Static Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle">
<div class="title">UWBIRStochasticPathlossModel Class Reference<div class="ingroups"><a class="el" href="a00524.html">IEEE 802.15.4A - Classes that implement the IEEE 802.15.4A UWB PHY.</a> &#124; <a class="el" href="a00511.html">analogueModels - AnalogueModel implementations</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="UWBIRStochasticPathlossModel" --><!-- doxytag: inherits="AnalogueModel" -->
<p>This <a class="el" href="a00009.html" title="Interface for the analogue models of the physical layer.">AnalogueModel</a> models implements the Ghassmezadeh stochastic UWB channel models.  
 <a href="a00226.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00408_source.html">UWBIRStochasticPathlossModel.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for UWBIRStochasticPathlossModel:</div>
<div class="dyncontent">
<div class="center"><img src="a01069.png" border="0" usemap="#UWBIRStochasticPathlossModel_inherit__map" alt="Inheritance graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for UWBIRStochasticPathlossModel:</div>
<div class="dyncontent">
<div class="center"><img src="a01070.png" border="0" usemap="#UWBIRStochasticPathlossModel_coll__map" alt="Collaboration graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a01071.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00226.html#a6ec46d3a30f4631c407295965a218ba8">initFromMap</a> (const <a class="el" href="a00009.html#ab1820eb5285a02a2464be54ec651feab">ParameterMap</a> &amp;)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the analog model from XML map data.  <a href="#a6ec46d3a30f4631c407295965a218ba8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00226.html#a9fda7231500ecd807a4fd8295b9907cb">filterSignal</a> (airframe_ptr_t, const <a class="el" href="a00065.html">Coord</a> &amp;, const <a class="el" href="a00065.html">Coord</a> &amp;)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Has to be overriden by every implementation.  <a href="#a9fda7231500ecd807a4fd8295b9907cb"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad35d61380860a7eab8298d84e6fafe9d"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::PL0" ref="ad35d61380860a7eab8298d84e6fafe9d" args="" -->
double&#160;</td><td class="memItemRight" valign="bottom"><b>PL0</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a16bccca6bb49e61038883dc354702db1"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::mu_gamma" ref="a16bccca6bb49e61038883dc354702db1" args="" -->
double&#160;</td><td class="memItemRight" valign="bottom"><b>mu_gamma</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a09c5048ae13e1bea3dc258c14552659d"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::sigma_gamma" ref="a09c5048ae13e1bea3dc258c14552659d" args="" -->
double&#160;</td><td class="memItemRight" valign="bottom"><b>sigma_gamma</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac7d6cb9ab03f0ff5286e6ae7611beea4"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::mu_sigma" ref="ac7d6cb9ab03f0ff5286e6ae7611beea4" args="" -->
double&#160;</td><td class="memItemRight" valign="bottom"><b>mu_sigma</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3004091ffb2569ca739ae7763a725615"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::sigma_sigma" ref="a3004091ffb2569ca739ae7763a725615" args="" -->
double&#160;</td><td class="memItemRight" valign="bottom"><b>sigma_sigma</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4330e7d56d416d1cc629bbe3e94a66e9"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::gamma" ref="a4330e7d56d416d1cc629bbe3e94a66e9" args="" -->
double&#160;</td><td class="memItemRight" valign="bottom"><b>gamma</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae2a531cf6fd70411fd6da3c1d93b3d82"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::S" ref="ae2a531cf6fd70411fd6da3c1d93b3d82" args="" -->
double&#160;</td><td class="memItemRight" valign="bottom"><b>S</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a415b80a63ec4d6e5804dec267f0aa738"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::sigma" ref="a415b80a63ec4d6e5804dec267f0aa738" args="" -->
double&#160;</td><td class="memItemRight" valign="bottom"><b>sigma</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4bd7c906c33e853156c89b572cce3b49"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::n1" ref="a4bd7c906c33e853156c89b572cce3b49" args="" -->
double&#160;</td><td class="memItemRight" valign="bottom"><b>n1</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1b876fdcbe5a34bff4ceae0291b5d369"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::n2" ref="a1b876fdcbe5a34bff4ceae0291b5d369" args="" -->
double&#160;</td><td class="memItemRight" valign="bottom"><b>n2</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7c84a96368f0b5f63466589fe85dc208"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::n3" ref="a7c84a96368f0b5f63466589fe85dc208" args="" -->
double&#160;</td><td class="memItemRight" valign="bottom"><b>n3</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a94fd7c1cef2f7df2ccd2d30659a38508"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::isEnabled" ref="a94fd7c1cef2f7df2ccd2d30659a38508" args="" -->
bool&#160;</td><td class="memItemRight" valign="bottom"><b>isEnabled</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a43cc0c84dc53b830ebf5bee4e4ede73c"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::shadowing" ref="a43cc0c84dc53b830ebf5bee4e4ede73c" args="" -->
bool&#160;</td><td class="memItemRight" valign="bottom"><b>shadowing</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a67a27e5bc4321278399bbcb796d02ce8"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::distances" ref="a67a27e5bc4321278399bbcb796d02ce8" args="" -->
cOutVector&#160;</td><td class="memItemRight" valign="bottom"><b>distances</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a337cce9e92e2d033ce4c375fcf610242"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::srcPosX" ref="a337cce9e92e2d033ce4c375fcf610242" args="" -->
cOutVector&#160;</td><td class="memItemRight" valign="bottom"><b>srcPosX</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a18757c617af83b7c458c2a92888fd560"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::srcPosY" ref="a18757c617af83b7c458c2a92888fd560" args="" -->
cOutVector&#160;</td><td class="memItemRight" valign="bottom"><b>srcPosY</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7ece8944fcf2a613990533db6b283c49"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::dstPosX" ref="a7ece8944fcf2a613990533db6b283c49" args="" -->
cOutVector&#160;</td><td class="memItemRight" valign="bottom"><b>dstPosX</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a44f6b1fdd806812e6190904e293b8280"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::dstPosY" ref="a44f6b1fdd806812e6190904e293b8280" args="" -->
cOutVector&#160;</td><td class="memItemRight" valign="bottom"><b>dstPosY</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3f4ce3e082aea938b66fe95a3953661e"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::myIndex" ref="a3f4ce3e082aea938b66fe95a3953661e" args="" -->
int&#160;</td><td class="memItemRight" valign="bottom"><b>myIndex</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af6c30afa4bc91386b2af266abd18ca25"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::myName" ref="af6c30afa4bc91386b2af266abd18ca25" args="" -->
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>myName</b></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5c93d9572fec58b2a3297540661bf8e3"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::Gtx" ref="a5c93d9572fec58b2a3297540661bf8e3" args="" -->
static const double&#160;</td><td class="memItemRight" valign="bottom"><b>Gtx</b> = 1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7020f1fe8f35071bda40f7c609acdb1f"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::Grx" ref="a7020f1fe8f35071bda40f7c609acdb1f" args="" -->
static const double&#160;</td><td class="memItemRight" valign="bottom"><b>Grx</b> = 1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aae690960abb93afef48628b8057ab7cd"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::ntx" ref="aae690960abb93afef48628b8057ab7cd" args="" -->
static const double&#160;</td><td class="memItemRight" valign="bottom"><b>ntx</b> = 1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a13d70526f3c7dc1b0d1c75dedfcb31b3"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::nrx" ref="a13d70526f3c7dc1b0d1c75dedfcb31b3" args="" -->
static const double&#160;</td><td class="memItemRight" valign="bottom"><b>nrx</b> = 1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a162c2b76d32d7eba9a87a3e152c6028e"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::fc" ref="a162c2b76d32d7eba9a87a3e152c6028e" args="" -->
static const double&#160;</td><td class="memItemRight" valign="bottom"><b>fc</b> = 4492.8</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a51c18c87e91e8c8b83658d2b61e01750"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::d0" ref="a51c18c87e91e8c8b83658d2b61e01750" args="" -->
static const double&#160;</td><td class="memItemRight" valign="bottom"><b>d0</b> = 1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a967f91932e97419c8ed16132bfaa48ba"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::n1_limit" ref="a967f91932e97419c8ed16132bfaa48ba" args="" -->
static double&#160;</td><td class="memItemRight" valign="bottom"><b>n1_limit</b> = 1.25</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acb6f7fc5bb351b4b3d56f71c46364ed9"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::n2_limit" ref="acb6f7fc5bb351b4b3d56f71c46364ed9" args="" -->
static double&#160;</td><td class="memItemRight" valign="bottom"><b>n2_limit</b> = 2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a259155ebc5a5fed9ba5d337f4f88bdd0"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::s_mu" ref="a259155ebc5a5fed9ba5d337f4f88bdd0" args="" -->
static const double&#160;</td><td class="memItemRight" valign="bottom"><b>s_mu</b> = 1.6</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6f5635d455213c7915c326bd6c286d52"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::s_sigma" ref="a6f5635d455213c7915c326bd6c286d52" args="" -->
static const double&#160;</td><td class="memItemRight" valign="bottom"><b>s_sigma</b> = 0.5</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2a784fefc809487edd20c91d602bd3ac"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::kappa" ref="a2a784fefc809487edd20c91d602bd3ac" args="" -->
static const double&#160;</td><td class="memItemRight" valign="bottom"><b>kappa</b> = 1</td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad47b2d55e7c9758e04e313c92a633217"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::getGhassemzadehPathloss" ref="ad47b2d55e7c9758e04e313c92a633217" args="(double distance) const " -->
double&#160;</td><td class="memItemRight" valign="bottom"><b>getGhassemzadehPathloss</b> (double distance) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a74cac9747c66d704a0218a91ecf15e3d"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::getFDPathloss" ref="a74cac9747c66d704a0218a91ecf15e3d" args="(double freq, double distance) const " -->
double&#160;</td><td class="memItemRight" valign="bottom"><b>getFDPathloss</b> (double freq, double distance) const </td></tr>
<tr><td colspan="2"><h2><a name="pro-static-methods"></a>
Static Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ade7dc743dee8f01dfaefe6ea1254b18c"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::getNarrowBandFreeSpacePathloss" ref="ade7dc743dee8f01dfaefe6ea1254b18c" args="(double fc, double distance)" -->
static double&#160;</td><td class="memItemRight" valign="bottom"><b>getNarrowBandFreeSpacePathloss</b> (double fc, double distance)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac8815d0a3314745544c2894a9050710f"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::simtruncnormal" ref="ac8815d0a3314745544c2894a9050710f" args="(double mean, double stddev, double a, int rng)" -->
static double&#160;</td><td class="memItemRight" valign="bottom"><b>simtruncnormal</b> (double mean, double stddev, double a, int rng)</td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa70659ad7163f6fc4fd263de2bbf1c45"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::pathloss_exponent" ref="aa70659ad7163f6fc4fd263de2bbf1c45" args="" -->
double&#160;</td><td class="memItemRight" valign="bottom"><b>pathloss_exponent</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae06e49a5ee7b6750e35bf5e5120e9481"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::fading" ref="ae06e49a5ee7b6750e35bf5e5120e9481" args="" -->
double&#160;</td><td class="memItemRight" valign="bottom"><b>fading</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a293d8f2e36a211e5b81e694148c7c15c"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::frequency" ref="a293d8f2e36a211e5b81e694148c7c15c" args="" -->
<a class="el" href="a00085.html">Dimension</a>&#160;</td><td class="memItemRight" valign="bottom"><b>frequency</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a55b0e186ad01841d2f88ccecd5de8906"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::pathlosses" ref="a55b0e186ad01841d2f88ccecd5de8906" args="" -->
cOutVector&#160;</td><td class="memItemRight" valign="bottom"><b>pathlosses</b></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>This <a class="el" href="a00009.html" title="Interface for the analogue models of the physical layer.">AnalogueModel</a> models implements the Ghassmezadeh stochastic UWB channel models. </p>
<p>Citation of the following publication is appreciated if you use the MiXiM UWB PHY model for a publication of your own. J. Rousselot, J.-D. Decotignie, An ultra-wideband impulse radio PHY layer model for network simulation. SIMULATION January 2011 vol. 87 no. 1-2 82-112.</p>
<p>For more information, see also:</p>
<p>[1] J. Rousselot, J.-D. Decotignie, An ultra-wideband impulse radio PHY layer model for network simulation. SIMULATION January 2011 vol. 87 no. 1-2 82-112. <a href="http://dx.doi.org/10.1177/0037549710377767">http://dx.doi.org/10.1177/0037549710377767</a> [2] J. Rousselot, Ultra Low Power Communication Protocols for UWB Impulse Radio Wireless Sensor Networks. EPFL Thesis 4720, 2010. <a href="http://infoscience.epfl.ch/record/147987">http://infoscience.epfl.ch/record/147987</a> [3] A High-Precision Ultra Wideband Impulse Radio Physical Layer Model for Network Simulation, Jérôme Rousselot, Jean-Dominique Decotignie, Second International Omnet++ Workshop,Simu'TOOLS, Rome, 6 Mar 09. <a href="http://portal.acm.org/citation.cfm?id=1537714">http://portal.acm.org/citation.cfm?id=1537714</a> </p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a9fda7231500ecd807a4fd8295b9907cb"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::filterSignal" ref="a9fda7231500ecd807a4fd8295b9907cb" args="(airframe_ptr_t, const Coord &amp;, const Coord &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UWBIRStochasticPathlossModel::filterSignal </td>
          <td>(</td>
          <td class="paramtype">airframe_ptr_t&#160;</td>
          <td class="paramname"><em>frame</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="a00065.html">Coord</a> &amp;&#160;</td>
          <td class="paramname"><em>sendersPos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="a00065.html">Coord</a> &amp;&#160;</td>
          <td class="paramname"><em>receiverPos</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Has to be overriden by every implementation. </p>
<p>Filters a specified AirFrame's <a class="el" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a> by adding an attenuation over time to the <a class="el" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">frame</td><td>The incomming frame. </td></tr>
    <tr><td class="paramname">sendersPos</td><td>The position of the frame sender. </td></tr>
    <tr><td class="paramname">receiverPos</td><td>The position of frame receiver. </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="a00009.html#a3242bc36a68dab53551d4ab1f1dab010">AnalogueModel</a>.</p>

<p>References <a class="el" href="a00192.html#a0beeef0f27c33145a0fca521df1c5f5c">Signal::addAttenuation()</a>, <a class="el" href="a00065.html#ab6a7bfcc5c55e5d8edbc7c0cb5a11626">Coord::distance()</a>, and <a class="el" href="a00212.html#a453ce64062fa7afd7398735a9cf499a6">TimeMapping&lt; Interpolator &gt;::setValue()</a>.</p>
<div class="fragment"><pre class="fragment">{
  <span class="keywordflow">if</span> (isEnabled) {
    <a class="code" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a>&amp; signal = frame-&gt;getSignal();
    <span class="comment">// Initialize objects and variables</span>
    <a class="code" href="a00212.html">TimeMapping&lt;Linear&gt;</a>* attMapping = <span class="keyword">new</span> <a class="code" href="a00212.html">TimeMapping&lt;Linear&gt;</a> ();
    <a class="code" href="a00013.html" title="Defines an argument for a mapping.">Argument</a> arg;

    <span class="comment">// Generate channel.</span>
    <span class="comment">// assume channel coherence during whole frame</span>

    n1 = simtruncnormal(0, 1, n1_limit, 1);
    n2 = simtruncnormal(0, 1, n2_limit, 2);
    n3 = simtruncnormal(0, 1, n2_limit, 3);

    gamma = mu_gamma + n1 * sigma_gamma;
    sigma = mu_sigma + n3 * sigma_sigma;
    S = n2 * sigma;

    <span class="comment">// Determine distance between sender and receiver</span>
    <span class="keywordtype">double</span> distance    = receiverPos.<a class="code" href="a00065.html#ab6a7bfcc5c55e5d8edbc7c0cb5a11626" title="Returns the distance to Coord &#39;a&#39;.">distance</a>(sendersPos);
    <span class="comment">/*</span>
<span class="comment">     srcPosX.record(senderPos.x);</span>
<span class="comment">     srcPosY.record(senderPos.y);</span>
<span class="comment">     dstPosX.record(receiverPos.x);</span>
<span class="comment">     dstPosY.record(receiverPos.y);</span>
<span class="comment">    */</span>
     distances.record(distance);

    <span class="comment">// Compute pathloss</span>
    <span class="keywordtype">double</span> attenuation = getGhassemzadehPathloss(distance);
    pathlosses.record(attenuation);
    <span class="comment">//attenuation = attenuation / (4*PI*pow(distance, gamma));</span>
    <span class="comment">// Store scalar mapping</span>
    attMapping-&gt;<a class="code" href="a00212.html#a453ce64062fa7afd7398735a9cf499a6" title="Changes the value of the function at the specified position.">setValue</a>(arg, attenuation);
    signal.<a class="code" href="a00192.html#a0beeef0f27c33145a0fca521df1c5f5c" title="Adds a function representing an attenuation of the signal.">addAttenuation</a>(attMapping);
  }
}
</pre></div>
</div>
</div>
<a class="anchor" id="a6ec46d3a30f4631c407295965a218ba8"></a><!-- doxytag: member="UWBIRStochasticPathlossModel::initFromMap" ref="a6ec46d3a30f4631c407295965a218ba8" args="(const ParameterMap &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool UWBIRStochasticPathlossModel::initFromMap </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00009.html#ab1820eb5285a02a2464be54ec651feab">ParameterMap</a> &amp;&#160;</td>
          <td class="paramname"><em>params</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initialize the analog model from XML map data. </p>
<p>This method should be defined for generic analog model initialization.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">params</td><td>The parameter map which was filled by XML reader.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the initialization was successfully. </dd></dl>

<p>Reimplemented from <a class="el" href="a00009.html#a9c52493cdf1baa4110a83869e8bc13c5">AnalogueModel</a>.</p>
<div class="fragment"><pre class="fragment">                                                                         {
    ParameterMap::const_iterator it;
    <span class="keywordtype">bool</span>                         bInitSuccess = <span class="keyword">true</span>;

    <span class="keywordflow">if</span> ((it = params.find(<span class="stringliteral">&quot;seed&quot;</span>)) != params.end()) {
        srand( ParameterMap::mapped_type(it-&gt;second).longValue() );
    }
    <span class="keywordflow">if</span> ((it = params.find(<span class="stringliteral">&quot;PL0&quot;</span>)) != params.end()) {
        PL0 = ParameterMap::mapped_type(it-&gt;second).doubleValue();
    }
    <span class="keywordflow">else</span> {
        bInitSuccess = <span class="keyword">false</span>;
        opp_warning(<span class="stringliteral">&quot;No PL0 defined in config.xml for UWBIRStochasticPathlossModel!&quot;</span>);
    }
    <span class="keywordflow">if</span> ((it = params.find(<span class="stringliteral">&quot;mu_gamma&quot;</span>)) != params.end()) {
        mu_gamma = ParameterMap::mapped_type(it-&gt;second).doubleValue();
    }
    <span class="keywordflow">else</span> {
        bInitSuccess = <span class="keyword">false</span>;
        opp_warning(<span class="stringliteral">&quot;No mu_gamma defined in config.xml for UWBIRStochasticPathlossModel!&quot;</span>);
    }
    <span class="keywordflow">if</span> ((it = params.find(<span class="stringliteral">&quot;sigma_gamma&quot;</span>)) != params.end()) {
        sigma_gamma = ParameterMap::mapped_type(it-&gt;second).doubleValue();
    }
    <span class="keywordflow">else</span> {
        bInitSuccess = <span class="keyword">false</span>;
        opp_warning(<span class="stringliteral">&quot;No sigma_gamma defined in config.xml for UWBIRStochasticPathlossModel!&quot;</span>);
    }
    <span class="keywordflow">if</span> ((it = params.find(<span class="stringliteral">&quot;mu_sigma&quot;</span>)) != params.end()) {
        mu_sigma = ParameterMap::mapped_type(it-&gt;second).doubleValue();
    }
    <span class="keywordflow">else</span> {
        bInitSuccess = <span class="keyword">false</span>;
        opp_warning(<span class="stringliteral">&quot;No mu_sigma defined in config.xml for UWBIRStochasticPathlossModel!&quot;</span>);
    }
    <span class="keywordflow">if</span> ((it = params.find(<span class="stringliteral">&quot;sigma_sigma&quot;</span>)) != params.end()) {
        sigma_sigma = ParameterMap::mapped_type(it-&gt;second).doubleValue();
    }
    <span class="keywordflow">else</span> {
        bInitSuccess = <span class="keyword">false</span>;
        opp_warning(<span class="stringliteral">&quot;No sigma_sigma defined in config.xml for UWBIRStochasticPathlossModel!&quot;</span>);
    }
    <span class="keywordflow">if</span> ((it = params.find(<span class="stringliteral">&quot;isEnabled&quot;</span>)) != params.end()) {
        isEnabled = ParameterMap::mapped_type(it-&gt;second).boolValue();
    }
    <span class="keywordflow">else</span> {
        bInitSuccess = <span class="keyword">false</span>;
        opp_warning(<span class="stringliteral">&quot;No isEnabled defined in config.xml for UWBIRStochasticPathlossModel!&quot;</span>);
    }
    <span class="keywordflow">if</span> ((it = params.find(<span class="stringliteral">&quot;shadowing&quot;</span>)) != params.end()) {
        shadowing = ParameterMap::mapped_type(it-&gt;second).boolValue();
    }
    <span class="keywordflow">else</span> {
        shadowing = <span class="keyword">false</span>;
    }

    <span class="keywordflow">return</span> <a class="code" href="a00226.html#a6ec46d3a30f4631c407295965a218ba8" title="Initialize the analog model from XML map data.">AnalogueModel::initFromMap</a>(params) &amp;&amp; bInitSuccess;
}
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/modules/analogueModel/<a class="el" href="a00408_source.html">UWBIRStochasticPathlossModel.h</a></li>
<li>D:/Projects/MiXiM/extsrc/mixim/src/modules/analogueModel/UWBIRStochasticPathlossModel.cc</li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00226.html">UWBIRStochasticPathlossModel</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:34 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
